#include "aduc812.h"

#define MAXBASE 0x8

void write_max( unsigned char __xdata *regnum, unsigned char val ) {
	unsigned char tmp = DPP;
  DPP     = MAXBASE;
  *regnum = val;
  DPP     = tmp;
}

unsigned char read_max( unsigned char __xdata *regnum ) {
	unsigned char val, tmp = DPP;
  DPP = MAXBASE;
  val = *regnum;
  DPP = tmp;
  return val;
}

